<pre>
<?php
	$handle = fopen("index", "r");
	if ($handle) {
	    while (($buffer = fgets($handle, 4096)) !== false) {
	        $FileArray[] = trim($buffer); 
	    }
	    if (!feof($handle)) {
	        echo "Error: unexpected fgets() fail\n";
	    }
	    fclose($handle);
	}
	print_r($FileArray);
	$mainFile = 'main.css';
	file_put_contents($mainFile, '');
	foreach($FileArray as $file) {
		$current = file_get_contents($file);
		file_put_contents($mainFile, $current , FILE_APPEND);
	}
	echo "Main.css Created";
?>
